package com.team.vlog_temp.Controller;

import com.team.vlog_temp.Dao.DepartmentPeopleDao;
import com.team.vlog_temp.Dao.MeuDao;
import com.team.vlog_temp.Service.Impl.MeuServiceImpl;
import com.team.vlog_temp.Service.Impl.TreeServiceImpl;
import com.team.vlog_temp.dto.TreeDto;
import com.team.vlog_temp.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@CrossOrigin // 允许所有来源的跨域请求
public class DepartmenPeopleController {
    @Autowired
    private DepartmentPeopleDao peopleDao;

    @Autowired
    private TreeServiceImpl treeService;

    //获取人员信息
    @RequestMapping("/getPeople")
    public List<Map<String, Object>> getPeople(){
        List<Map<String, Object>> peopleList = peopleDao.getPeople();
        //return treeService.convertToTreeDto(departMentlist);
        return peopleList;
    }

    //获取菜单信息
    //pu


}
